Skip to content

TIRust bridge: binary64 gate 1e-10 - #528

Open
huashengshao wants to merge 1 commit into
mainfrom
fix/tirust-dp-gate-1e-10
Open

huashengshao wants to merge 1 commit into
mainfrom
fix/tirust-dp-gate-1e-10

Conversation

@huashengshao

Copy link
Copy Markdown
Contributor

What

The TIRust bridge now sets EmbedderOptions::gate to DP_GATE = 1e-10. Until now it left it at None, which is TIRust's default of 1e-12. The change is bridge-only, in vendor/tirust/src/lib.rs: TIRust and its pin (1c130a81) are unchanged. The PR also adds a README paragraph and a bridge test.

Why

TIRust's binary64 first pass accepts a lane only if its conditioning, raised to the recursion depth, reaches the gate. At 1e-12 it accepts rounding amplified by up to about 1e12 and returns the result as a success.

MadLoop's stability checks can't detect this. The Gram systems are built from the supplied invariants, which every rotated frame and both loop directions share, so each check repeats the same error.

Measured on pin 1c130a81 with the production bridge, against higher-precision evaluations of the same binary64 inputs:

Case Gate 1e-12 (now) Gate 1e-10
u u~ > z g g g, check-profile trace (53,200 calls) 3,164 calls move to the double-double tier; the largest moves are 6.1e-3 (n = 3, rank 2) and 2.7e-3 (n = 4, rank 3) largest error left in binary64: 5.6e-8
u u~ > z g g g, default-card trace (464,000 calls) largest move 5.9e-7 largest error left in binary64: 5.1e-8
g g > Upsilon g triangle with a 10 MeV gluon (conditioning 4.9e-12 at depth 2) 5.9e-5 off, the same in rotated and boosted frames double-double tier, 4.9e-17

Statuses are unchanged on all of these traces.

Effect on matrix elements

Qualification points. I ran the 11 ordinary qualification processes of campaign tirust-1c130a81-1, 100 frozen points each, with backend 9. The current library reproduces the stored values bit-identically. With this change:

  • no MadLoop return code changes;
  • the largest relative moves of the finite part are 2.9e-9 (u u~ > z z g g), 9.9e-10 (g g > h h), 2.6e-10 (e+ e- > mu+ mu- a a), 5.6e-11 (u u~ > z g g) and 3.0e-12 (e+ e- > t t~ a);
  • the other 6 processes don't move.

u u~ > z g g g. On a fresh standalone export from main, 20 RAMBO points:

  • no return code changes;
  • the finite part moves by at most 3.9e-11;
  • MadLoop's own accuracy estimate improves at several points, for example from 2.1e-10 to 1.0e-12.

Cost

Paired replays of the u u~ > z g g g traces, one core each, measure +23% (check profile) and +35% (default card) TIRust time per point. A 1e-8 gate would cost +48% and +64%, for errors already below 6e-8 at 1e-10. These are shared-host measurements, not acceptance timings.

Checks

  • install tirust into a fresh prefix with this branch passes, including smoke --require-poles. Only libmadloop_tirust.so changes; libtirust.a and mtirust.mod are byte-identical.
  • Bridge tests (cargo test --release --locked in vendor/tirust): 23 passed. The new test, ill_conditioned_soft_triangle_takes_a_precision_tier, fails with gate: None, where it takes route Direct instead of the double-double tier.
  • tools/tirust_benchmark_cache.py on qcd_n1_uux_z with the new library: 61/61 records pass.
  • The MadLoop consumers of the route counters only parse and transport them; none asserts a tier distribution.

Not done: a full requalification campaign on the new library, and acceptance timing.

The patch and the trace evidence come from the TIRust optimisation work; the matrix-element and cache checks above were run on this branch.

🤖 Generated with Claude Code

The bridge left EmbedderOptions::gate at None, TIRust's default of 1e-12:
the binary64 first pass accepted a lane whose conditioning, raised to the
recursion depth, was at least 1e-12, so rounding amplified by up to about
1e12 was returned as a success. MadLoop's checks cannot see this: the Gram
systems come from the supplied invariants, which every frame and both loop
directions share, so the checks repeat the error instead of measuring it.

On pin 1c130a81, replays of the u u~ > z g g g check-profile trace had
tensors up to 6.1e-3 off (n = 3, rank 2), and a g g > Upsilon g triangle
with a 10 MeV gluon (conditioning 4.9e-12 at depth 2) was 5.9e-5 off, all
as successes. With gate 1e-10 those lanes go to the double-double tier;
the largest binary64 error left on the u u~ > z g g g traces is about 6e-8.

Add DP_GATE = 1e-10, a README paragraph and a bridge test
(ill_conditioned_soft_triangle_takes_a_precision_tier), which fails with
gate None (route Direct instead of the double-double tier).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

How CI reacts to this PR

  • Not a draft: the full CI runs automatically when the PR is opened and on every push.
  • Draft: only the unittest and IOtest workflows run. Mark the PR "Ready for review" to start the full CI.
  • run-ci label: while this label is on the PR, every job keeps running after a failure, so you see all failures. Without it, the first failing job cancels the other runs of that commit.
  • Closing or merging: the unfinished CI runs of this PR are cancelled. A merge gets its own run on main.
  • Pushes to main: the full CI runs after each merge.
  • Other branches: run CI only through workflow_dispatch.
  • Forks: the runs use a read-only token, so they cannot cancel each other.
  • Merge: a green CI and one approval are required to merge.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant